import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '@/views/public/Main'
import Home from '@/views/Home'
import Detail from '@/views/Detail'
import Points from '@/views/Points'
import About from '@/views/About'

Vue.use(VueRouter)
const router = new VueRouter({
  routes: [
    {
      path: '/',
      name: 'main',
      component: Main,
      children: [
        {
          path: '/',
          name: '看展',
          component: Home
        },
        {
          path: '/detail/:id',
          name: '详情',
          component: Detail
        },
        {
          path: '/points',
          name: '艺点',
          component: Points
        },
        {
          path: '/about',
          name: '关于',
          component: About
        }
      ]
    }
  ]
})
export default router
